define(function(require, exports, module) {
	J = jQuery;
	require('layer');
	layer.config({
	    path: '/assets/vendors/layer/' //layer.js所在的目录，可以是绝对目录，也可以是相对目录
	});
	var timenow = new Date().getTime();
	
	$('#province').change(function () {
        $('#city option:gt(0)').remove();
        $('#area option:gt(0)').remove();
        var id=$(this).val();
        //alert(id);
        $.ajax({
            type: "post",
            dataType:"json",
            url: "/member/region.json",
            data: {"id":id},
            success: function (result) {
                var strocity = '';
                var datas = eval(result);
                $.each(datas, function(i,val){
                	strocity += "<option value='"+val.region_id+"' >"+val.region_name+"</option>";
                });  
                $('#city').append(strocity);
            }
        })
    });	
	
	 $('#city').change(function () {
		 $('#area option:gt(0)').remove();
	     var id=$(this).val();
         $.ajax({
                type: "post",
                dataType:"json",
                url: "/member/region.json",
                data: {"id":id},
                success: function (result) {
                    var stroarea = '';
                    var datas = eval(result);
                    $.each(datas, function(i,val){
                    	stroarea += "<option value='"+val.region_id+"' >"+val.region_name+"</option>";
                    });
                    $('#area').append(stroarea);
                }
              })
         });

});